package main

import (
    "strings"

    "github.com/lxn/walk"
    . "github.com/lxn/walk/declarative"
)
// go get github.com/lxn/walk
// go get github.com/lxn/walk/declarative
func main() {
    var inTE1, inTE2, outTE *walk.TextEdit
    println("Hello World")
    MainWindow{
        Title:   "码表转换生成器",
        MinSize: Size{600, 400},
        Layout:  VBox{},
        Children: []Widget{
            HSplitter{
                Children: []Widget{
                    TextEdit{AssignTo: &inTE1, VScroll: true, Name: "特征"},
                    TextEdit{AssignTo: &inTE2, VScroll: true, Name: "情感"},
                    TextEdit{AssignTo: &outTE, VScroll: true, ReadOnly: true, Name: "结果"},
                },
            },
            PushButton{
                Text: "转换",
                OnClicked: func() {
                          //处理生成结果
                    outTE.SetText(strings.Join(result, "\n"))
                },
            },
        },
    }.Run()
}

type pair struct {
    first, second string
}
